<h2>Creating a new task for <%= @project.name %></h2>
<%= render :partial => "projects/project_info" %>

<% form_for [@project,@task] do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label "Task name" %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :start_time %><br />
    <%= f.datetime_select :start_time %>
  </p>
  <p>
    <%= f.label :due_by %><br />
    <%= f.datetime_select :due_by %>
  </p>
  <p>
	<%= f.select :manager_id, @candidates.collect { |c| [c.name, c.id] }, :prompt => "Select PM" %>
  </p>
  <p>
    <%= f.label "Description" %><br />
    <%= f.text_area :desc %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', project_path(@project) %>
